/*
 *@Author: 张楚
 *@Date: 2021-08-18 11:21:41
 *@Description: 回复评论
*/
import 'package:flutter/material.dart';
import 'package:totaldemo/project/official_detail/reply_receive_person.dart';
import 'package:totaldemo/project/official_detail/reply_send_person.dart';

class ReplyCommentPage extends StatefulWidget {
  const ReplyCommentPage({Key key}) : super(key: key);
  @override
  _ReplyCommentPageState createState() => _ReplyCommentPageState();
}

class _ReplyCommentPageState extends State<ReplyCommentPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('评论回复'),
      ),
      body: TabBarCommentLayout(),
    );
  }
}

class TabBarCommentLayout extends StatelessWidget {
  const TabBarCommentLayout({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 2,
      child: Scaffold(
        appBar: AppBar(
          toolbarHeight: 40,
          // elevation: 0,
          backgroundColor: Colors.white,
          automaticallyImplyLeading: false,
          title: Row(
            children: [
              Expanded(
                child: Container(
                  margin: EdgeInsets.only(right: 50),
                  height: 40,
                  child: TabBar(
                    labelColor: Color(0xff202B99),
                    labelStyle: TextStyle(
                        fontSize: 15,
                        color: Color(0xff1D268E),
                        fontWeight: FontWeight.w500),
                    //指示器的颜色
                    indicatorColor: Color(0xff1D268E),
                    indicatorSize: TabBarIndicatorSize.label,
                    unselectedLabelColor: Color(0xffADADAD),
                    unselectedLabelStyle: TextStyle(fontSize: 14),
                    tabs: [
                      Tab(text: "回复发件人"),
                      Tab(text: "回复接收人"),
                    ],
                  ),
                ),
              )
            ],
          ),
        ),
        body: TabBarView(children: [
          ReplySendPersonPage(),
          ReplyReceivePersonPage(),
        ]),
      ),
    );
  }
}
